package ar.uba.dc.tl.mylanga.exception;

import java.util.List;

public class SemanticExceptions extends SemanticException {

	private List<SemanticException> exceptions;

	public SemanticExceptions(List<SemanticException> exceptions) {
		this.exceptions = exceptions;
	}

	@Override
	public String getMessage() {
		StringBuilder sb = new StringBuilder('\n');

		for (SemanticException exception : exceptions) {
			sb.append(exception.getMessage());
			sb.append('\n');
		}

		return sb.toString();
	}
}
